﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.HomeServer.Controls;

namespace Microsoft.HomeServer.HomeServerConsoleTab.TV4Home.Server.WHS.AddIn
{
    public partial class AboutFormControl : UserControl
    {
        public AboutFormControl()
        {
            InitializeComponent();

            this.lblVersion.Text = Utils.Misc.AddInVersion;
        }
    }

    public class AboutForm : Wizard
    {
        public AboutForm()
        {
            base.Width = Microsoft.HomeServer.Controls.CommonSettings.PropertyPageStdWidth;
            base.Height = Microsoft.HomeServer.Controls.CommonSettings.PropertyPageStdHeight;
            base.WizardIcon = Icon.FromHandle(((Bitmap)Microsoft.HomeServer.Controls.CommonSettings.InformationImage24x24).GetHicon());
            base.Text = "About TV4Home";

            base.Init();

            base.SetTypes(new Type[] { typeof(WP_AboutForm) });
        }
    }

    public class WP_AboutForm : WizardPage
    {
        public WP_AboutForm(Wizard parentWizard, object currentSubject, object currentParameter)
        {
            base.ParentWizard = parentWizard;
            base.HideTopBannerAndLines = true;

            base.OkButtonName = CommonSettings.WizardStandardButtonNameOk;

            base.Init();

            base.OkButtonEnabled = true;
            base.OkButton.DialogResult = DialogResult.OK;
            base.ParentWizard.AcceptButton = base.OkButton;
            base.ParentWizard.CancelButton = base.OkButton;

            base.PlaceControlIntoWizardPage(new AboutFormControl());
        }
    }
}
